import request from '@/utils/request'

// 查询自动接单配置列表
export function listReceive_order_config(query) {
  return request({
    url: '/hmk/receive_order_config/list',
    method: 'get',
    params: query
  })
}

// 查询自动接单配置详细
export function getReceive_order_config(id) {
  return request({
    url: '/hmk/receive_order_config/' + id,
    method: 'get'
  })
}

export function getInfoByUserId(userId) {
  return request({
    url: '/hmk/receive_order_config/getInfoByUserId/' + userId,
    method: 'get'
  })
}


// 新增自动接单配置
export function addReceive_order_config(data) {
  return request({
    url: '/hmk/receive_order_config',
    method: 'post',
    data: data
  })
}

// 修改自动接单配置
export function updateReceive_order_config(data) {
  return request({
    url: '/hmk/receive_order_config',
    method: 'put',
    data: data
  })
}

export function addOrUpdate(data) {
  return request({
    url: '/hmk/receive_order_config/addOrUpdate',
    method: 'post',
    data: data
  })
}


// 删除自动接单配置
export function delReceive_order_config(id) {
  return request({
    url: '/hmk/receive_order_config/' + id,
    method: 'delete'
  })
}
